// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) ansi lnc 

package com.example.airkissdemo.network;

import android.util.Log;
import java.io.IOException;
import java.net.*;

public class UDPClient
{

    public UDPClient()
    {
        mClientSocket = new DatagramSocket();
_L1:
        return;
        SocketException socketexception;
        socketexception;
        Log.e("AirKissDemo.UDPClient", "new DatagramSocket error");
        socketexception.printStackTrace();
          goto _L1
    }

    protected void finalize()
        throws Throwable
    {
        mClientSocket.close();
        super.finalize();
    }

    public void sendData(byte abyte0[], int i, String s, int j)
    {
        if(abyte0 == null || i <= 0)
            Log.e("AirKissDemo.UDPClient", "sendData input error");
        else
            try
            {
                DatagramPacket datagrampacket = new DatagramPacket(abyte0, i, InetAddress.getByName(s), j);
                mClientSocket.send(datagrampacket);
                mClientSocket.close();
            }
            catch(UnknownHostException unknownhostexception)
            {
                Log.e("AirKissDemo.UDPClient", "InetAddress.getByName error");
                unknownhostexception.printStackTrace();
            }
            catch(IOException ioexception)
            {
                Log.e("AirKissDemo.UDPClient", "DatagramSocket.send error");
                ioexception.printStackTrace();
            }
    }

    private static final String TAG = "AirKissDemo.UDPClient";
    private DatagramSocket mClientSocket;
}
